import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Login from './views/Login'
import ItemQuery from './views/ItemQuery'
import SysConfig from './views/SysConfig'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      path: '/home',
      name: 'Home',
      redirect: '/home/query',
      component: Home,
      children: [
        {
          path: 'query',
          name: 'ItemQuery',
          component: ItemQuery
        },
        {
          path: 'config',
          name: 'Config',
          component: SysConfig
        }
      ]
    }
  ]
})
